Ideally, the use case we have for MetaGroup would be removed but that
requires investigation that could be done as a future step
The function also expects a MetaWindowX11, so add a check to ensure
we don't crash at runtime if the function gets called on a wayland
client
Also removes an unused header import
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3157>
#include <glib.h>
#include <gio/gio.h>
#include <meta/display.h>
-#include <meta/group.h>
#include <meta/window.h>
#include "shell-app-usage.h"
MetaGroup *group;
GSList *iter;
- group = meta_window_get_group (window);
+ group = meta_window_x11_get_group (window);
if (group == NULL)
return NULL;
/* If we didn't get a startup-notification match, see if we matched
* any other windows in the group.
*/
- if (result == NULL)
+ if (result == NULL && meta_window_get_client_type (window) == META_WINDOW_CLIENT_TYPE_X11)
result = get_app_from_window_group (tracker, window);
/* Our last resort - we create a fake app from the window */